<%@ page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@page import="com.printeverywhere.util.AttributeConstants"%>
<%@page import="com.printeverywhere.util.SessionUtil"%>
<%@page import="com.printeverywhere.util.CommonUtil"%>
<%@ taglib prefix="s" uri="/struts-tags"%>

<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
	String affiliateLink = "registrationForm.htm?" + AttributeConstants.REFERAL + "=";
	affiliateLink += CommonUtil.encrypt(String.valueOf(SessionUtil.getUser(request).getId()));

	request.setAttribute("link", basePath + affiliateLink);
%>

<table width="100%" border="0" cellspacing="0" cellpadding="0">
	<tr>
		<td>
			<div class="blue-text16" style="margin: 0px 0px 0px 0px">
				<s:text name="affiliatelink.heading" />
			</div>
			<div class="header-separator-bg" style="margin: 10px 5px 17px 0px"></div>
			<div class="common-text" style="margin: 0px 0px 10px 0px">
				<table width="100%" border="0">
					<tr>
						<td width="100%">
							<s:text name="affiliatelink.body">
								<s:param name="value" value="#attr.configuration.siteName" />
								<s:param name="value" value="%{#request.link}" />
							</s:text>
						</td>
					</tr>
				</table>
			</div>
		</td>
	</tr>
</table>

